package com.sharding.jdbc.service.impl;

import com.sharding.jdbc.domain.User;
import com.sharding.jdbc.mapper.UserMapper;
import com.sharding.jdbc.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 描述
 *
 * @author zhu_jinsheng
 * @version 1.0
 * @date 2020/8/26 17:29
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int insert(User user) {
        return userMapper.insert(user);
    }
}
